Skip to content

Commit

Permalink
[Podspec] Remain backwards-compatible to 0.39.0
Browse files Browse the repository at this point in the history
This commit can be reverted when dropping backwards-compatibility to versions of CocoaPods before 1.0.
  • Loading branch information
mrackwitz committed Feb 25, 2016
1 parent 5fb180e commit 71bb893
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 26 deletions.
48 changes: 24 additions & 24 deletions Realm.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -16,34 +16,34 @@ Pod::Spec.new do |s|
s.documentation_url = "https://realm.io/docs/objc/#{s.version}"
s.license = { :type => 'Apache 2.0', :file => 'LICENSE' }

public_header_files = 'include/RLMArray.h',
'include/RLMCollection.h',
'include/RLMConstants.h',
'include/RLMDefines.h',
'include/RLMListBase.h',
'include/RLMMigration.h',
'include/RLMObject.h',
'include/RLMObjectBase.h',
'include/RLMObjectSchema.h',
'include/RLMOptionalBase.h',
'include/RLMPlatform.h',
'include/RLMProperty.h',
'include/RLMRealm.h',
'include/RLMRealmConfiguration.h',
'include/RLMResults.h',
'include/RLMSchema.h',
'include/Realm.h',
public_header_files = 'include/**/RLMArray.h',
'include/**/RLMCollection.h',
'include/**/RLMConstants.h',
'include/**/RLMDefines.h',
'include/**/RLMListBase.h',
'include/**/RLMMigration.h',
'include/**/RLMObject.h',
'include/**/RLMObjectBase.h',
'include/**/RLMObjectSchema.h',
'include/**/RLMOptionalBase.h',
'include/**/RLMPlatform.h',
'include/**/RLMProperty.h',
'include/**/RLMRealm.h',
'include/**/RLMRealmConfiguration.h',
'include/**/RLMResults.h',
'include/**/RLMSchema.h',
'include/**/Realm.h',

# Realm.Dynamic module
'include/RLMRealm_Dynamic.h',
'include/RLMObjectBase_Dynamic.h'
'include/**/RLMRealm_Dynamic.h',
'include/**/RLMObjectBase_Dynamic.h'

# Realm.Private module
private_header_files = 'include/*_Private.h',
'include/RLMAccessor.h',
'include/RLMListBase.h',
'include/RLMObjectStore.h',
'include/RLMOptionalBase.h'
private_header_files = 'include/**/*_Private.h',
'include/**/RLMAccessor.h',
'include/**/RLMListBase.h',
'include/**/RLMObjectStore.h',
'include/**/RLMOptionalBase.h'

source_files = 'Realm/*.{m,mm}',
'Realm/ObjectStore/*.cpp',
Expand Down
16 changes: 14 additions & 2 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -894,12 +894,24 @@ case "$COMMAND" in
mv core/include include/core

mkdir -p include/impl/apple
touch Realm/RLMPlatform.h
cp Realm/*.h include
cp Realm/*.hpp include
cp Realm/ObjectStore/*.hpp include
cp Realm/ObjectStore/impl/*.hpp include/impl
cp Realm/ObjectStore/impl/apple/*.hpp include/impl/apple

touch Realm/RLMPlatform.h
if [ -n "$COCOAPODS_VERSION" ]; then
# This variable is set for the prepare_command beginning
# from the 1.0 prereleases, which requires a different
# header layout within the header_mappings_dir.
cp Realm/*.h include
else
# For CocoaPods < 1.0, we need to scope the headers within
# the header_mappings_dir by another subdirectory to avoid
# that Clang complains about non-modular headers.
mkdir -p include/Realm
cp Realm/*.h include/Realm
fi
else
echo "let swiftLanguageVersion = \"$(get_swift_version)\"" > RealmSwift/SwiftVersion.swift
fi
Expand Down

0 comments on commit 71bb893

Please sign in to comment.