ios - Mach-O-Link error -


i'm working on app includes in app purchases. being tired of having copy paste same class files in projects decided create static library.

i followed several of available guides on web on how create static library ios seem running problems.

undefined symbols architecture armv7:   "_objc_class_$_nwstorepackage", referenced from:       objc-class-ref in storetableviewcontroller.o ld: symbol(s) not found architecture armv7 clang: error: linker command failed exit code 1 (use -v see invocation) 

the same error displayed arm64 architecture

i linked library, added header files. updated header search paths, updated framework paths. don't know more can do... used following script.

# define output folder environment variable   universal_outputfolder=${build_dir}/${configuration}-universal  # step 1. build device , simulator versions xcodebuild -target ${project_name} only_active_arch=no -configuration ${configuration} -sdk iphoneos  build_dir="${build_dir}" build_root="${build_root}" xcodebuild -target ${project_name} -configuration ${configuration} -sdk iphonesimulator -arch i386 build_dir="${build_dir}" build_root="${build_root}"  # make sure output directory exists  mkdir -p "${universal_outputfolder}"  # step 2. create universal binary file using lipo lipo -create -output "${universal_outputfolder}/lib${project_name}.a" "${build_dir}/${configuration}-iphoneos/lib${project_name}.a" "${build_dir}/${configuration}-iphonesimulator/lib${project_name}.a"  # last touch. copy header files. convenience cp -r "${build_dir}/${configuration}-iphoneos/include" "${universal_outputfolder}/" 

did checked headers copied in right directory (in 1 specified in header path of application setting?).

if header not generated, maybe have missed add header copy file step. or not have copy header build phase:

enter image description here


Comments

Popular posts from this blog

commonjs - How to write a typescript definition file for a node module that exports a function? -

openid - Okta: Failed to get authorization code through API call -

thorough guide for profiling racket code -