2

I'm trying to integrate Google gtl framwork with my app. But It give error as below.

Ignoring file /Users/mani/Documents/Example/GooglePlusExample/SampleApp/Security.framework/Security, missing required architecture i386 in file /Users/mani/Documents/Example/GooglePlusExample/SampleApp/Security.framework/Security (2 slices)

 "_SecItemAdd", referenced from:


      -[GTMOAuth2Keychain setPassword:forService:accessibility:account:error:] in GoogleOpenSource(GTMOAuth2ViewControllerTouch.o)


  "_SecItemCopyMatching", referenced from:


      -[GTMOAuth2Keychain passwordForService:account:error:] in GoogleOpenSource(GTMOAuth2ViewControllerTouch.o)


  "_SecItemDelete", referenced from:


      -[GTMOAuth2Keychain removePasswordForService:account:error:] in GoogleOpenSource(GTMOAuth2ViewControllerTouch.o)


  "_SecRandomCopyBytes", referenced from:


      -[GPPSignIn randomString] in GooglePlus(GPPSignIn.o)


  "_kSecAttrAccessible", referenced from:


      -[GTMOAuth2Keychain setPassword:forService:accessibility:account:error:] in GoogleOpenSource(GTMOAuth2ViewControllerTouch.o)


  "_kSecAttrAccessibleAfterFirstUnlockThisDeviceOnly", referenced from:


      +[GTMOAuth2ViewControllerTouch saveParamsToKeychainForName:accessibility:authentication:error:] in GoogleOpenSource(GTMOAuth2ViewControllerTouch.o)


  "_kSecAttrAccount", referenced from:


      +[GTMOAuth2Keychain keychainQueryForService:account:] in GoogleOpenSource(GTMOAuth2ViewControllerTouch.o)


  "_kSecAttrGeneric", referenced from:


      +[GTMOAuth2Keychain keychainQueryForService:account:] in GoogleOpenSource(GTMOAuth2ViewControllerTouch.o)


  "_kSecAttrService", referenced from:


      +[GTMOAuth2Keychain keychainQueryForService:account:] in GoogleOpenSource(GTMOAuth2ViewControllerTouch.o)


  "_kSecClass", referenced from:


      +[GTMOAuth2Keychain keychainQueryForService:account:] in GoogleOpenSource(GTMOAuth2ViewControllerTouch.o)


  "_kSecClassGenericPassword", referenced from:


      +[GTMOAuth2Keychain keychainQueryForService:account:] in GoogleOpenSource(GTMOAuth2ViewControllerTouch.o)


  "_kSecMatchLimit", referenced from:


      -[GTMOAuth2Keychain passwordForService:account:error:] in GoogleOpenSource(GTMOAuth2ViewControllerTouch.o)


  "_kSecMatchLimitOne", referenced from:


      -[GTMOAuth2Keychain passwordForService:account:error:] in GoogleOpenSource(GTMOAuth2ViewControllerTouch.o)


  "_kSecRandomDefault", referenced from:


      -[GPPSignIn randomString] in GooglePlus(GPPSignIn.o)


  "_kSecReturnData", referenced from:


      -[GTMOAuth2Keychain passwordForService:account:error:] in GoogleOpenSource(GTMOAuth2ViewControllerTouch.o)


  "_kSecValueData", referenced from:


      -[GTMOAuth2Keychain setPassword:forService:accessibility:account:error:] in GoogleOpenSource(GTMOAuth2ViewControllerTouch.o)


ld: symbol(s) not found for architecture i386

But I've follow their instruction correct. Security.framework are added, also Other Linker Flags: -ObjC have set correctly. I can assume, there is silly mistake. But I couldn't found out. Please help me.

Note: I'm using xcode5.0.

Update: I've added all frameworks which they'd mentioned. See my screeshot. enter image description here

Update2: Now it's working with iPod Touch-5 devices, But not working with simulator. I don't know, How it's working with device.

Mani
  • 17,549
  • 13
  • 79
  • 100
  • http://stackoverflow.com/a/18080078/2522603 ...check here..it is minor mistake...hope it ll help u... – ChenSmile Mar 03 '14 at 13:24
  • @Immi Could you tell that minor mistake? That link direct me to youtube video. – Mani Mar 03 '14 at 13:38
  • ya please go through the video, i faced lots of error before watching this video i solved all. i m dam sure, u ll too. please check all the steps, you have followed. In case any issue please feel free to pint me. I m there to answer you... – ChenSmile Mar 03 '14 at 13:40
  • ok I'll let you know if It will solve my problem. My question is about google plus framework. But you direct me to google-drive integration step. Any way I will try this. – Mani Mar 03 '14 at 13:44

3 Answers3

3

You seem to have unintentionally copied the Security.framework to your project instead of just linking to it from the Framework search path.

File path shows the framework path,

/SampleApp/Security.framework/Security

Check you project directory for .framework file and delete it. Clean + Build again. Check here for few more workarounds.

Hope that helps!

Community
  • 1
  • 1
Amar
  • 13,202
  • 7
  • 53
  • 71
  • 1
    Wow man. You found it. Issue fixed. I've remove securtiy.framework my project and project directory. And BuildSetting -> Build Phase -> Linked binary with libs -> add security framework. Thank amar :) – Mani Mar 12 '14 at 06:28
  • But don't know why it's work with device and why not with simulator? – Mani Mar 12 '14 at 06:29
  • @Mani Don't know the exact reason, but `FRAMEWORK_SEARCH_PATHS` setting of your project gets messed. – Amar Mar 12 '14 at 06:32
1

You're missing the SystemConfiguration framework - try adding that and you should be good to go.

Ian Barber
  • 19,765
  • 3
  • 58
  • 58
  • No man. I've added this too. see my updated question with screeshot. – Mani Mar 04 '14 at 05:19
  • Have you tried doing a clean and rebuild, and maybe resetting the simulator? – Ian Barber Mar 04 '14 at 14:24
  • Ya I've tried that also. Did you see updated question? It's working with device but not with simulator. Did you see this " missing required architecture i386 in file in first line of error"? – Mani Mar 04 '14 at 14:32
0

It clearly shows that the framework ( Google gtl ) is not built for i386 architecture (simulator).Instead the framework is built for device architectures (armv7 and armv7s). It will not work in simulator.

If you want to run on simulator you supposed to get simulator version of Google gtl framework.

Barani
  • 552
  • 4
  • 18
  • What you mean by `i386 architecture `? Is anything special architecture for simulator? – Mani Mar 11 '14 at 10:26
  • Yes, refer this http://stackoverflow.com/questions/7874519/ios-simulator-on-mac-is-running-i386-architecture-not-armv7 – Barani Mar 11 '14 at 14:47
  • Ok. But I couldn't accept with this line `It will not work in simulator`. I do some RnD and let you know. – Mani Mar 12 '14 at 06:22