{"id":19935061,"url":"https://github.com/optimizely/objective-c-sdk","last_synced_at":"2025-05-03T12:31:03.079Z","repository":{"id":51329417,"uuid":"69407259","full_name":"optimizely/objective-c-sdk","owner":"optimizely","description":"Optimizely X Objective-C SDK for iOS and tvOS","archived":false,"fork":false,"pushed_at":"2023-07-14T15:49:41.000Z","size":471404,"stargazers_count":24,"open_issues_count":0,"forks_count":24,"subscribers_count":108,"default_branch":"master","last_synced_at":"2025-04-15T03:19:45.200Z","etag":null,"topics":["optimizely-environment-prod","optimizely-environment-public","optimizely-owner-px"],"latest_commit_sha":null,"homepage":"","language":"Objective-C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/optimizely.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":"CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-09-27T23:32:27.000Z","updated_at":"2024-01-26T16:25:03.000Z","dependencies_parsed_at":"2024-06-19T02:56:51.307Z","dependency_job_id":null,"html_url":"https://github.com/optimizely/objective-c-sdk","commit_stats":null,"previous_names":[],"tags_count":282,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/optimizely%2Fobjective-c-sdk","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/optimizely%2Fobjective-c-sdk/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/optimizely%2Fobjective-c-sdk/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/optimizely%2Fobjective-c-sdk/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/optimizely","download_url":"https://codeload.github.com/optimizely/objective-c-sdk/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252190660,"owners_count":21708920,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["optimizely-environment-prod","optimizely-environment-public","optimizely-owner-px"],"created_at":"2024-11-12T23:18:39.772Z","updated_at":"2025-05-03T12:30:58.066Z","avatar_url":"https://github.com/optimizely.png","language":"Objective-C","readme":"# Objective-C SDK\n[![Apache 2.0](https://img.shields.io/github/license/nebula-plugins/gradle-extra-configurations-plugin.svg)](http://www.apache.org/licenses/LICENSE-2.0)\n[![Carthage compatible](https://img.shields.io/badge/Carthage-compatible-4BC51D.svg?style=flat)](https://github.com/carthage/carthage)\n![Coveralls](https://img.shields.io/coveralls/optimizely/objective-c-sdk.svg)\n![Platforms](https://img.shields.io/cocoapods/p/OptimizelySDKiOS.svg)\n[![Podspec](https://img.shields.io/cocoapods/v/OptimizelySDKiOS.svg)](https://cocoapods.org/pods/OptimizelySDKiOS)\n![Platforms](https://img.shields.io/cocoapods/p/OptimizelySDKTVOS.svg)\n[![Podspec](https://img.shields.io/cocoapods/v/OptimizelySDKTVOS.svg)](https://cocoapods.org/pods/OptimizelySDKTVOS)\n\nThis repository houses the Objective-C SDK for use with Optimizely Full Stack and Optimizely Rollouts for Mobile and OTT.\n\nOptimizely Full Stack is A/B testing and feature flag management for product development teams. Experiment in any application. Make every feature on your roadmap an opportunity to learn. Learn more at https://www.optimizely.com/platform/full-stack/, or see the [documentation](https://docs.developers.optimizely.com/full-stack/docs).\n\nOptimizely Rollouts is free feature flags for development teams. Easily roll out and roll back features in any application without code deploys. Mitigate risk for every feature on your roadmap. Learn more at https://www.optimizely.com/rollouts/, or see the [documentation](https://docs.developers.optimizely.com/rollouts/docs).\n\n## Getting Started\n\n---\n**NOTE**\n\nFor new and upgrading iOS users, it's recommended to use our new [Swift-SDK](https://github.com/optimizely/swift-sdk) written completely in Swift. The Swift SDK will serve as our primary iOS SDK for new development moving forward. It is functionally compatible with the Objective-C SDK and provides an extended feature set with simplified interfaces. \n\nExisting Objective-C SDK users can look at our [guide document](https://docs.developers.optimizely.com/full-stack/docs/migrate-to-swift-sdk) for migrating into the new Swift SDK.\n\n---\n\n### Using the SDK\n\nSee [Install the iOS and tvOS SDKs](https://docs.developers.optimizely.com/full-stack/docs/install-sdk-objective-c) to learn how to set\nup an Optimizely X project and start using the SDK.\n\n### Requirements\n* iOS 8.0+ / tvOS 9.0+\n\n### Installing the SDK\n \nPlease note below that _\\\u003cplatform\\\u003e_ is used to represent the platform on which you are building your app. Currently, we support ```iOS``` and ```tvOS``` platforms.\n\n**note: if you or another framework are using sqlite, then you should probably add compiler options for thead safe sqlite: SQLITE_THREADSAFE=1\nhttps://www.sqlite.org/threadsafe.html\n\n#### Cocoapod \n1. Add the following lines to the _Podfile_:\u003cpre\u003e\n    ```use_frameworks!```\n    ```pod 'OptimizelySDK\u003cplatform\u003e', '~\u003e 3.1.5'```\n\u003c/pre\u003e\n\n2. Run the following command: \u003cpre\u003e``` pod install ```\u003c/pre\u003e\n\nFurther installation instructions for Cocoapods: https://guides.cocoapods.org/using/getting-started.html\n\n#### Carthage\n1. Add the following lines to the _Cartfile_:\u003cpre\u003e \ngithub \"optimizely/objective-c-sdk\" ~\u003e 3.1.5\n\u003c/pre\u003e\n\n2. Run the following command:\u003cpre\u003e```carthage update```\u003c/pre\u003e\n\n3. Link the frameworks to your project. Go to your project target's **Link Binary With Libraries** and drag over the following from the _Carthage/Build/\\\u003cplatform\\\u003e_ folder: \u003cpre\u003e \n      OptimizelySDKCore.framework\n      OptimizelySDKDatafileManager.framework\n      OptimizelySDKEventDispatcher.framework\n      OptimizelySDKShared.framework\n      OptimizelySDKUserProfileService.framework\n      OptimizelySDK\\\u003cplatform\\\u003e.framework\u003c/pre\u003e\n\n4. To ensure that proper bitcode-related files and dSYMs are copied when archiving your app, you will need to install a Carthage build script:\n      - Add a new **Run Script** phase in your target's **Build Phase**.\u003c/br\u003e\n      - In the script area include:\u003cpre\u003e\n      ```/usr/local/bin/carthage copy-frameworks```\u003c/pre\u003e \n      - Add the paths to the frameworks to the **Input Files** list:\u003cpre\u003e\n            ```$(SRCROOT)/Carthage/Build/\u003cplatform\u003e/OptimizelySDKCore.framework```\n            ```$(SRCROOT)/Carthage/Build/\u003cplatform\u003e/OptimizelySDKDatafileManager.framework```\n            ```$(SRCROOT)/Carthage/Build/\u003cplatform\u003e/OptimizelySDKEventDispatcher.framework```\n            ```$(SRCROOT)/Carthage/Build/\u003cplatform\u003e/OptimizelySDKShared.framework```\n            ```$(SRCROOT)/Carthage/Build/\u003cplatform\u003e/OptimizelySDKUserProfileService.framework```\n            ```$(SRCROOT)/Carthage/Build/\u003cplatform\u003e/OptimizelySDK\u003cplatform\u003e.framework```\u003c/pre\u003e\n      - Add the paths to the copied frameworks to the **Output Files** list:\u003cpre\u003e\n            ```$(BUILT_PRODUCTS_DIR)/$(FRAMEWORKS_FOLDER_PATH)/OptimizelySDKCore.framework```\n            ```$(BUILT_PRODUCTS_DIR)/$(FRAMEWORKS_FOLDER_PATH)/OptimizelySDKDatafileManager.framework```\n            ```$(BUILT_PRODUCTS_DIR)/$(FRAMEWORKS_FOLDER_PATH)/OptimizelySDKEventDispatcher.framework```\n            ```$(BUILT_PRODUCTS_DIR)/$(FRAMEWORKS_FOLDER_PATH)/OptimizelySDKShared.framework```\n            ```$(BUILT_PRODUCTS_DIR)/$(FRAMEWORKS_FOLDER_PATH)/OptimizelySDKUserProfileService.framework```\n            ```$(BUILT_PRODUCTS_DIR)/$(FRAMEWORKS_FOLDER_PATH)/OptimizelySDK\u003cplatform\u003e.framework```\u003c/pre\u003e\n\nFuther installation instructions for Carthage: https://github.com/Carthage/Carthage\n\n#### Manual Installation\n\nThe universal framework can be used in an application without the need for a third-party dependency manager. The universal framework packages up all Optimizely X Mobile modules, which include:\u003cpre\u003e\n\t```OptimizelySDKCore```\n\t```OptimizelySDKShared```\n\t```OptimizelySDKDatafileManager```\n\t```OptimizelySDKEventDispatcher```\n\t```OptimizelySDKUserProfileService```\u003c/pre\u003e\n\nThe universal framework for iOS includes builds for the following architectures:\u003cpre\u003e\n\t```i386```\n\t```x86_64```\n\t```ARMv7```\n\t```ARMv7s```\n\t```ARM64```\u003c/pre\u003e\n\nThe universal framework for tvOS includes builds for the following architectures:\u003cpre\u003e\n\t```x86_64```\n\t```ARM64```\u003c/pre\u003e\n\nBitcode is enabled for both the iOS and tvOS universal frameworks. \n\nIn order to install the universal framework, follow the steps below:\n\n1. Download the [iOS](./OptimizelySDKUniversal/generated-frameworks/Release-iOS-universal-SDK/OptimizelySDKiOS.framework.zip) or [tvOS](./OptimizelySDKUniversal/generated-frameworks/Release-tvOS-universal-SDK/OptimizelySDKTVOS.framework.zip) framework.\n\n2. Unzip the framework, then drag the framework to your project in Xcode; Xcode should prompt you to select a target. Go to **Build Phases** and make sure that the framework is under the **Link Binary with Libraries** section.\n \n3. Go to the **General** tab and add the framework to the **Embedded Binaries** section. If the **Embedded Binaries** section is not visible, add the framework in the **Copy Files** section (you can add this section in **Build Settings**).\n\n4. The Apple store will reject your app if you have the universal framework installed as it includes simulator binaries. Therefore, a script to strip the extra binaries needs to be run before you upload the app. To do this, go to **Build Phases** and add a **Run Script** section by clicking the ```+``` symbol. Copy and paste the following script (make sure you replace the ```FRAMEWORK_NAME``` with the proper framework name!\n):\n\t ```\n\tFRAMEWORK=\"FRAMEWORK_NAME\"\n\tFRAMEWORK_EXECUTABLE_PATH=\"${BUILT_PRODUCTS_DIR}/${FRAMEWORKS_FOLDER_PATH}/$FRAMEWORK.framework/$FRAMEWORK\"\n\tEXTRACTED_ARCHS=()\n\tfor ARCH in $ARCHS\n\tdo\n\t\tlipo -extract \"$ARCH\" \"$FRAMEWORK_EXECUTABLE_PATH\" -o \"$FRAMEWORK_EXECUTABLE_PATH-$ARCH\"\n\t\tEXTRACTED_ARCHS+=(\"$FRAMEWORK_EXECUTABLE_PATH-$ARCH\")\n\tdone\n\tlipo -o \"$FRAMEWORK_EXECUTABLE_PATH-merged\" -create \"${EXTRACTED_ARCHS[@]}\"\n\trm \"${EXTRACTED_ARCHS[@]}\"\n\trm \"$FRAMEWORK_EXECUTABLE_PATH\"\n\tmv \"$FRAMEWORK_EXECUTABLE_PATH-merged\" \"$FRAMEWORK_EXECUTABLE_PATH\"\n\t```\nIf you choose to build the universal framework yourself, you can do so by running the ```OptimizelySDKiOS-Universal``` or ```OptimizelySDKTVOS-Universal``` schemes. After building these schemes, the frameworks are output in the **OptimizelySDKUniversal/generated-frameworks** folder.\n\n### Contributing\nPlease see [CONTRIBUTING](CONTRIBUTING.md).\n\n### Credits\n\nFirst-party code (under OptimizelySDKCore/, OptimizelySDKDatafileManager/, OptimizelySDKEventDispatcher/, OptimizelySDKiOS/, OptimizelySDKShared/, OptimizelySDKTVOS/, OptimizelySDKUniversal/, OptimizelySDKUserProfileService/, ) is copyright Optimizely, Inc. and contributors, licensed under Apache 2.0.\n\n### Additional Code\n\n**FMDB** [https://github.com/ccgus/fmdb](https://github.com/ccgus/fmdb)  \nLicense (MIT):: [https://github.com/ccgus/fmdb/blob/master/LICENSE.txt](https://github.com/ccgus/fmdb/blob/master/LICENSE.txt)\nModified: Yes\nDistributed: Yes\nDistribution: Binary\n\n**SQLITE3** [https://www.sqlite.org/index.html](https://www.sqlite.org/index.html)  \nLicense (Public Domain):: [https://www.sqlite.org/copyright.html](https://www.sqlite.org/copyright.html)\nModified: Yes\nDistributed: Yes\nDistribution: Binary\n\n**JSONModel** [https://github.com/jsonmodel/jsonmodel](https://github.com/jsonmodel/jsonmodel)  \nLicense (MIT):: [https://github.com/jsonmodel/jsonmodel/blob/master/LICENSEl](https://github.com/jsonmodel/jsonmodel/blob/master/LICENSE)\nModified: Yes\nDistributed: Yes\nDistribution: Binary\n\n**murmur3** [https://github.com/PeterScott/murmur3l](https://github.com/PeterScott/murmur3)  \nLicense (Public Domain):: [https://github.com/PeterScott/murmur3l](https://github.com/PeterScott/murmur3)\nModified: No\nDistributed: Yes\nDistribution: Binary\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foptimizely%2Fobjective-c-sdk","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Foptimizely%2Fobjective-c-sdk","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foptimizely%2Fobjective-c-sdk/lists"}