iOS 5 , Xcode 4.2 and ProtoBuf - iphone

I'm trying to compile google protobuf protocol for using it in my iOS 5 project, but with no success yet... I found only one blog post about the topic here. But when I try this method I receive error:
h-3.2# make
make all-recursive
Making all in .
make[2]: Nothing to be done for `all-am’.
Making all in src
protoc -I. –cpp_out=. google/protobuf/unittest.proto google/protobuf/unittest_empty.proto google/protobuf/unittest_import.proto google/protobuf/unittest_mset.proto google/protobuf/unittest_optimize_for.proto google/protobuf/unittest_embed_optimize_for.proto google/protobuf/unittest_custom_options.proto google/protobuf/unittest_lite.proto google/protobuf/unittest_import_lite.proto google/protobuf/unittest_lite_imports_nonlite.proto google/protobuf/unittest_no_generic_services.proto google/protobuf/compiler/cpp/cpp_test_bad_identifiers.proto
google/protobuf/unittest.proto:490:46: Expected number.
google/protobuf/unittest.proto:491:51: Expected number.
google/protobuf/unittest.proto:492:46: Expected number.
google/protobuf/unittest.proto:493:44: Expected number.
google/protobuf/unittest.proto:494:49: Expected number.
google/protobuf/unittest.proto:495:44: Expected number.
make[2]: *** [unittest_proto_middleman] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2
I have worked old project with protobuf but it is created in xcode 3.x.
Is there a way or some tutorial how to use it in xcode 4.2 and armv7 architecture?
I lose 2 days of my project time to research the problem and still no success... My project deadline is soon and I have no chance to proceed without this protobuf...

Have you tried using Objective-C protocol buffers?

This blog post gives the instructions on how to compile the protobuf library with armv7, armv7s, i386 architectures for iOS. There is also a link in the blog post to download a precompiled iOS library for protobuf that works on the device as well as the simulator.

Related

Xcode error: building for iOS Simulator, but linking in object file built for iOS

Never had a lot of problems until the time to buy Macbook Air M1. Just yesterday my app was build without any error in Xcode 12.4. I did not make any special changes and today build failed:
/Users/userName/Projects/MyApp/ios/Pods/OpenSSL-Universal/ios/lib/libcrypto.a(cryptlib.o), building for iOS Simulator, but linking in object file built for iOS, file '/Users/userName/Projects/MyApp/ios/Pods/OpenSSL-Universal/ios/lib/libcrypto.a' for architecture arm64clang: error: linker command failed with exit code 1 (use -v to see invocation)
Please can you help me, how to solve it?
Looks like a missing Arm64 simulator slice in the OpenSSL-Universal CocoaPods distribution.
Make sure that you're using the latest version with pod update and contact the OpenSSL-Universal if there's still an issue.

RingCentral Swift compile fail

I am new to RingCentral. I am trying with RingCentral Swift for iOS application. I am checking the reference here.
I am getting following issue of compile failure:
*** Fetching Alamofire
*** Fetching ObjectMapper
*** Checking out ObjectMapper at "3.4.2"
*** Checking out Alamofire at "4.8.1"
*** Checking out ringcentral-swift at "1.0.1"
*** Checking out CryptoSwift at "0.14.0"
*** Checking out objective-c at "v4.8.5"
*** xcodebuild output can be found in /var/folders/49/ckkpnf9n6lgbfsfp407twf840000gn/T/carthage-xcodebuild.gTqjHT.log
*** Building scheme "Alamofire iOS" in Alamofire.xcworkspace
*** Building scheme "CryptoSwift" in CryptoSwift.xcworkspace
*** Building scheme "Framework (iOS)" in PubNub.xcworkspace
*** Building scheme "ObjectMapper-iOS" in ObjectMapper.xcworkspace
*** Building scheme "RingCentral_iOS" in RingCentral.xcodeproj
Build Failed
Task failed with exit code 65: /usr/bin/xcrun xcodebuild -project /Users/......./Downloads
I searched the reason in the community but failed to understand why is the compile issue.
Please help.
I am the author of that SDK. It has low priority because it doesn't have lots of users as the other SDKs (such as C# and JS). I've got your feedback and I will try to update the SDK this quarter. Thanks.
The Swift SDK hasn't been updated for years as referenced here:
The same issue was registered here: https://github.com/ringcentral/ringcentral-swift/issues/17
Maybe the Carthage version causing the issue. You can download their repository and open their Xcode project in the latest xcode, build the project and follow the steps here to resolve the issue: RingCentral: Build Failed Task failed with exit code 65: Carthage installation
As a workaround, if you are building a GUI app, you can use WebView and JavaScript SDK as suggested here for the same issue: https://community.ringcentral.com/questions/89996/couldnt-build-ringcentral-library.html

Cocoapods 0.35 is failing build

I'm working on a Swift app in Xcode 6. Everything was working okay until I decided to install cocoa pods and a pod. When I try to run it on the simulator, I get the following error:
ld: 91 duplicate symbols for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Before the error, there is a listing of all those duplicate symbols.
First few lines in error message:
Ld /<...>/Library/Developer/Xcode/DerivedData/<...>-gydnbbvfswpkkodlsuxdkpzkklzb/Build/Products/Debug-iphonesimulator/<...>.app/<...> normal x86_64
cd "/<...>/Documents/iOS Apps/<...>/<...>"
export IPHONEOS_DEPLOYMENT_TARGET=8.1
I even tried uninstalling the pod, but the error persists. I'm completely stuck – any help is much appreciated. Thanks!
Maybe you should update your CocoaPods to 0.36 or a later version, and add use_frameworks! to your Podfile. See this: CocoaPods 0.36 - Framework and Swift Support
Maybe :
You have put the same class implementation into two different files;
You actually have just one implementation of this class, however you are also linking in your project a framework or library containing a class whose name is exactly the same of yours.

clang: error no such file or directory: */Debug-iphonesimulator/MailCore/MailCore

I am using mailcore2 in my ios app from fetching my gmail account emails on my device. I have changed the ios sdkversion from 6.1 to 6.0 in the mailcore2 scripts bcz I am trying to compile and run the app using iPhone simulator 6.0 which uses ios sdkversion 6.0. Doing so I am getting the following clang error.
clang: error: no such file or directory: '/Users/shujaat/Library/Developer/Xcode/DerivedData/MyTestApp-ditognlaoajwldfliplqecnxqbfj/Build/Products/Debug-iphonesimulator/MailCore/MailCore'
While trying to compile and run my app using iphone simulator 6.1 (uses ios sdk 6.1), with no changes in the ios sdk version in the shell scripts, I am getting the following error:
/bin/sh /Users/shujaat/Documents/WemoTech/Products/WantList/sourcecode/ThirdPartyLib/MailCore2/Externals/builds/workdir/20130930192723/src/libetpan/build-mac/update.sh
configuring
running prepare-cyrus-sasl.sh
prepare sources
patching file lib/client.c
building tools
generated makemd5i386 properly
building for iPhoneOS - armv7
CONFIGURE FAILED
Command /bin/sh failed with exit code 1
These issues are driving me crazy for the last couple of days. Need your help.
Go to your main project target->"Build phases"->"Target dependencies" add mailcore2 ios
You need to read Check Adding MailCore to Your iOS Project carefully.
These issues are fixed now. I want to explain what I did to get rid of them for others facing same issues:
I made a separate project, and made mailcore2 as a part of it (didn't include the #import line in any of the project files at first). I compiled and run the project and copied the resultant mailcore 2 from it to my original project. It's compiling and running fine now.

Cannot compile the BB10 sample native app "HelloWorldDisplay" in Momentics

I'm having trouble compiling the HelloWorldDisplay native appusing the Momentics IDE.
I have followed through the Getting Started guide on the BB10 native SDK developer pages:
https://developer.blackberry.com/native/beta/documentation/getting_started.html
I downloaded the sample apps and attempted to import and build the HelloWorldDisplay app by right clicking it and selecting build.
The build fails and the following console output is displayed:
**** Build of configuration Device-Debug for project HelloWorldDisplay ****
make all
make -j 1 -CDevice-Debug -fmakefile all
make[1]: Entering directory `C:/Users/pro-cln0042/Downloads/Code/BB10Examples/HelloWorldDisplay/Device-Debug'
make[1]: Leaving directory `C:/Users/pro-cln0042/Downloads/Code/BB10Examples/HelloWorldDisplay/Device-Debug'
make[1]: *** No rule to make target `HelloWorldDisplay', needed by `all'. Stop.
make: *** [all] Error 2
**** Build Finished ****
Was I wrong in thinking that Momentics was supposed to handle this automatically, and that I should just be able to right-click->build without settings up any compilers, build files etc?
I'm new to BB development and Eclipse/Momentics in general. Any advice on how to resolve these errors would be much appreciated.
Your link returns a 404 Not Found error. I suspect you have set up an old development environment. Go to the BB10 Beta 2 site and download the NDK from there an follow the instructions. The PlayBook and BB10 NDKs are based on Momentics but have substantial customization to support development for BlackBerry (especially BB10). Since it is in Beta it is a moving target and you have to keep your IDE and simulators up to date.