Added -fobjc-arc But Still Get ARC Error

Answered

Comments

4 comments

  • Avatar
    Max Konev

    -fobjc-arc is not a linker flag, but compiler flag. As an option just add Pushwoosh as project (xcodeproj file) not as a source. If you add as a source go to the build phases, compile sources phase, select Pushwoosh source, double-click and add "-fobjc-arc" as per instruction here (under important blue section):

    http://www.pushwoosh.com/programming-push-notification/ios/ios-additional-platforms/unity-integration/

  • Avatar
    Pushwoosh

    Hi Shader,

    The link that you provided looks like the same method that I said I already tried. This is my third or fourth installation of PushWoosh. The previous ones were with your older SDK and Xcode 4.6 and they all worked fine. It's this new SDK and Xcode 5 that is giving the errors.

    I have already tried adding the -fobjc-arc compiler flags and that gives me a whole new set of errors.

    Undefined symbols for architecture armv7s:
      "_kCLLocationAccuracyThreeKilometers", referenced from:
          -[PWLocationTracker setDistanceToNearestGeoZone:] in PWLocationTracker.o
      "_kCLLocationAccuracyHundredMeters", referenced from:
          -[PWLocationTracker setDistanceToNearestGeoZone:] in PWLocationTracker.o
      "_OBJC_CLASS_$_CLLocation", referenced from:
          objc-class-ref in PWLocationTracker.o
      "_kCLLocationAccuracyBest", referenced from:
          -[PWLocationTracker setDistanceToNearestGeoZone:] in PWLocationTracker.o
          -[PWLocationTracker startApproximateGeoTracking] in PWLocationTracker.o
          -[PWLocationTracker locationManager:didEnterRegion:] in PWLocationTracker.o
      "_OBJC_CLASS_$_CLCircularRegion", referenced from:
          objc-class-ref in PWLocationTracker.o
      "_OBJC_CLASS_$_CLRegion", referenced from:
          objc-class-ref in PWLocationTracker.o
      "_OBJC_CLASS_$_CLLocationManager", referenced from:
          objc-class-ref in PWLocationTracker.o
    ld: symbol(s) not found for architecture armv7s
    clang: error: linker command failed with exit code 1 (use -v to see invocation)
    

    Thanks

  • Avatar
    Max Konev

    That errors are simply missing frameworks. Simply add Corelocation framework to your project.

  • Avatar
    Pushwoosh

    Awesome! That eliminated those errors. My other projects already had that framework included so I hadn't seen those errors before. You may want to add the list of required frameworks to this page http://www.pushwoosh.com/programming-push-notification/ios/native-ios-sdk-integration/. Thanks for the help.

Please sign in to leave a comment.