Unable to set Deployment Target to iOS 7.0

N Nicolas Hinze 3 years 6 months ago
3 2 0

The default XCode project built by Rhodes 5.0.2 sets the "Deployment Target" of "rhorunner" to iOS 6.0. However, when I set it to iOS 7.0, XCode fails to build the app for the iPhone Simulator or Device with many "Apple Match O-Linker Errors".

System:
- Rhodes 5.0.2
- Ruby 1.9.3
- Mac OS X Yosemite 10.0.1
- XCode 5.1.1 and iOS 7.1 SDK

Steps:
- delete everything under "project" in the Rhodes app folder to have a clean slate.
- Run rake build:iphone:setup_xcode_project in the Rhodes app folder to create XCode Project.
- Open project with XCode.
- Project can be built for iPhone Simulator and Device.
- Change the "rhorunner" Deployment target to iOS 7.0 and the project Deployment target to iOS 7.0.
- XCode is now unable to build the project for simulator or device.

build.yml:

name: "MyApp"
extensions:
  - json
  - rholang
capabilities:
  - gps
  - camera
  - network_state
  - vibrate
  - sdcard
env:
  app: "/Users/me/Documents/Apps/MyApp"
sdk: "/Users/me/.rvm/gems/ruby-1.9.3-p551/gems/rhodes-5.0.2"
android:
  version: "4.4.2"
  minSDK: 17
  android_title: 0
  manifest_template: "AndroidManifest.erb"
build: "release"
applog: "rholog.txt"
version: "3.0.1"
vendor: "myapp"
sdkversion: "5.0.2"
iphone:
  provisionprofile: "XXXX"
  BundleURLScheme: "myapp"
  BundleIdentifier: "com.myapps.myapp"
  sdk: "iphoneos7.1"
  emulator: 7.1
  emulatortarget: "iphone"
  codesignidentity: "iPhone Developer: Me (XXXXXX)"
  entitlements:
  configuration: "Release"

XCode Error message:

Undefined symbols for architecture i386:
  "std::basic_string::c_str() const", referenced from:
      std::string rho::common::convertToStringA(std::basic_string const&) in libRhodes.a(MethodResult.o)
      std::string rho::common::convertToStringA(std::basic_string const&) in libRhodes.a(JSONIterator.o)
  "std::string::find_last_of(char, unsigned long) c.....

Please Register or Login to post a reply

2 Replies

N Nicolas Hinze

I fixed this issue with the help of this StackOverflow thread:

xcode - IOS7 (only) stdlibc++ linking issue - Stack Overflow

Simply add an empty.mm file to the XCode project. That's it!

P Paul Goh

Not sure if it is the same problem, but I had a similar issue with Rhodes 4.1.1 and XCode 6.
I would get "Undefined symbols for architecture armv7" .. .if I changed target to IOS 7.0 or higher.

However Setting Target to IOS 6.0 worked fine as you described.
I could get our project to build with target IOS 7.0 and above by adding libstdc++.6.dylib to Linked Frameworks and Libraries.

CONTACT
Can’t find what you’re looking for?