Skip to content

Commit b5192e4

Browse files
Ivan Dlugosvaind
authored andcommitted
add README.md with iOS implementation info
1 parent a12e06c commit b5192e4

File tree

2 files changed

+17
-6
lines changed

2 files changed

+17
-6
lines changed

ios/README.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
Contents of this folder is based on `flutter create --template=plugin`.
2+
It was reduced to the minimum that works for library inclusion by client apps.
3+
4+
Notably, the package depends on `ObjectBox.framework` from ObjectBox Swift distribution, downloading
5+
a released `ObjectBox-framework-X.Y.Z.zip` archive.
6+
7+
## Current limitations/TODOs
8+
There's currently an [issue](https://github.com/flutter/flutter/issues/45778) with Flutter tooling and/or its integration
9+
with Cocoapods. In short, an "http" source in the podspec doesn't work - the file has to be available locally.
10+
11+
To circumvent this, we're currently including the extracted `ObjectBox.framework` for iOS in the package when publishing
12+
to pub.dev. Therefore, you need to run ./ios/download-framework.sh before publishing the package.
13+
This has the benefit of a "no-setup" iOS support for the ObjectBox users - it works out of the box.
14+
Also notably, we're only including the bare minimum from the ObjectBox Swift release which means smaller final app size.
15+
16+
Note for contributors: you need to run the above-mentioned script as well to be able to test ObjectBox on iOS.

ios/objectbox.podspec

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,7 @@ Pod::Spec.new do |s|
1212
s.author = 'ObjectBox'
1313
s.platform = :ios, '8.0'
1414

15-
# Get the ObjectBox.framework from the objectbox-swift release
16-
# TODO: getting from http currently doesn't work - see https://github.com/flutter/flutter/issues/45778
17-
# To circumvent this, we're currently including the extracted framework in the package when publishing to pub.dev
18-
# Therefore, you need to run ./ios/download-framework.sh before publishing the package (or if you're working on
19-
# ObjectBox-Dart as a developer and need to test it for iOS)
20-
# s.source = { :http => 'https://github.com/objectbox/objectbox-swift/releases/download/v1.2.0/ObjectBox-framework-1.2.0.zip' }
15+
# Get the ObjectBox.framework from the objectbox-swift release (see README.md)
2116
s.source = { :path => '.' }
2217

2318
s.ios.vendored_frameworks = 'Carthage/Build/iOS/ObjectBox.framework'

0 commit comments

Comments
 (0)