IOS linking problems on extra frameworks (using ios.add_libs to include CoreTelephony )

79 views
Skip to first unread message

Ivan Stoiev

unread,
Jun 24, 2014, 11:28:57 PM6/24/14
to codenameone...@googlegroups.com, Fabrício Cabeça
Hi guys 

I was trying to use ios.add_libs to include CoreTelephony.framework, but I do not see effects on build logs:

Ld build/Release-iphoneos/TestApp.app/TestApp normal armv7
    cd /var/folders/p_/xlvwhg4101z8r81_nl13cds80000gn/T/build2256176984141127345xxx/dist
    setenv IPHONEOS_DEPLOYMENT_TARGET 4.3
    setenv PATH "/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin"
    /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/llvm-gcc-4.2 -arch armv7 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS6.1.sdk -L/var/folders/p_/xlvwhg4101z8r81_nl13cds80000gn/T/build2256176984141127345xxx/dist/build/Release-iphoneos -L/var/folders/p_/xlvwhg4101z8r81_nl13cds80000gn/T/build2256176984141127345xxx/dist/../btres -F/var/folders/p_/xlvwhg4101z8r81_nl13cds80000gn/T/build2256176984141127345xxx/dist/build/Release-iphoneos -filelist /var/folders/p_/xlvwhg4101z8r81_nl13cds80000gn/T/build2256176984141127345xxx/dist/build/TestApp.build/Release-iphoneos/TestApp.build/Objects-normal/armv7/TestApp.LinkFileList -dead_strip -lz -miphoneos-version-min=4.3 -weak-liconv -weak_framework AddressBookUI -weak_framework MapKit -weak_framework AudioToolbox -framework Foundation -weak_framework OpenGLES -weak-lxml2 -weak_framework QuartzCore -weak_framework AddressBook -weak-lsqlite3 -lzbar -weak_framework GameKit -weak_framework Security -framework CoreMotion -framework UIKit -weak_framework CoreLocation -weak_framework MessageUI -weak_framework MediaPlayer -framework CoreGraphics -weak_framework AVFoundation -weak_framework CoreVideo -weak_framework QuickLook -weak_framework StoreKit -weak_framework iAd -weak_framework CoreMedia -o /var/folders/p_/xlvwhg4101z8r81_nl13cds80000gn/T/build2256176984141127345xxx/dist/build/Release-iphoneos/TestApp.app/TestApp
Undefined symbols for architecture armv7:
  "_OBJC_CLASS_$_CTTelephonyNetworkInfo", referenced from:
      objc-class-ref in com_codename1_telephony_TelephonyInfoImpl.o
ld: symbol(s) not found for architecture armv7
collect2: ld returned 1 exit status

The exactly Build Hint entry is ios.add_libs=CoreTelephony.framework
Is there something that I'm missing?

Best Regards

Shai Almog

unread,
Jun 25, 2014, 12:43:57 AM6/25/14
to codenameone...@googlegroups.com, fabrici...@gmail.com
Hi,
that should work correctly. Check that you don't have redundant spaces or anything in the build hint. In the log for the build look for the --lib arguments and see if CoreTelephony.framework is passed as one of the frameworks.

Ivan Stoiev

unread,
Jun 26, 2014, 8:19:11 PM6/26/14
to codenameone...@googlegroups.com, fabrici...@gmail.com
Hi Shai

I could compile with a own mobile provision. This feature could be in http://www.codenameone.com/advanced-build.html, with a warning about not to use the generic mobile provision?

PS: I tried to change  ios.includePush on 'Build Hints', but it's not working. Seens ok, but when I return after a change, it's not changed. I could change it manually. I`m using NetBeans 8.0 and lastest Codename One version.

Thanks!  

Shai Almog

unread,
Jun 27, 2014, 1:30:29 AM6/27/14
to codenameone...@googlegroups.com, fabrici...@gmail.com
Hi,
include push will only work if your provisioning profile includes push and only if you are a pro user.
Reply all
Reply to author
Forward
0 new messages