Skip to content

Commit

Permalink
add underscore
Browse files Browse the repository at this point in the history
  • Loading branch information
RyosukeCla committed Aug 30, 2023
1 parent 8b3b321 commit 23326a9
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -131,11 +131,11 @@ Morondava is a charming coastal town located on the western coast of Madagascar.
ScrollView(.vertical) {
nativebrik
.experiment
.embedding(id: "cjjei1223akg00bptlh0")
.embedding("cjjei1223akg00bptlh0")
.frame(width: nil, height: 270)
nativebrik
.experiment
.remoteConfigAsView(id: "cjm5piq23akg008u0km0") { phase in
.remoteConfigAsView("cjm5piq23akg008u0km0") { phase in
switch phase {
case .failure:
Text("error")
Expand Down
16 changes: 8 additions & 8 deletions ios/Nativebrik/Classes/sdk.swift
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ public class NativebrikExperiment {
self.overlayVC = overlay
}

public func embedding(id: String) -> some View {
public func embedding(_ id: String) -> some View {
return EmbeddingSwiftView(
experimentId: id,
user: self.user,
Expand All @@ -204,7 +204,7 @@ public class NativebrikExperiment {
}

public func embedding<V: View>(
id: String,
_ id: String,
onEvent: ((_ event: ComponentEvent) -> Void)?,
@ViewBuilder content: (@escaping (_ phase: AsyncComponentPhase) -> V)
) -> some View {
Expand All @@ -219,7 +219,7 @@ public class NativebrikExperiment {
}

public func embedding<I: View, P: View>(
id: String,
_ id: String,
onEvent: ((_ event: ComponentEvent) -> Void)?,
@ViewBuilder content: (@escaping (_ component: any View) -> I),
@ViewBuilder placeholder: (@escaping () -> P)
Expand All @@ -235,7 +235,7 @@ public class NativebrikExperiment {
)
}

public func embeddingUIView(id: String) -> UIView {
public func embeddingUIView(_ id: String) -> UIView {
return EmbeddingUIView(
experimentId: id,
user: self.user,
Expand All @@ -246,7 +246,7 @@ public class NativebrikExperiment {
)
}

public func embeddingUIView(id: String, onEvent: ((_ event: ComponentEvent) -> Void)?) -> UIView {
public func embeddingUIView(_ id: String, onEvent: ((_ event: ComponentEvent) -> Void)?) -> UIView {
return EmbeddingUIView(
experimentId: id,
user: self.user,
Expand All @@ -257,7 +257,7 @@ public class NativebrikExperiment {
)
}

public func embeddingUIView(id: String, onEvent: ((_ event: ComponentEvent) -> Void)?, content: @escaping (_ phase: ComponentPhase) -> UIView) -> UIView {
public func embeddingUIView(_ id: String, onEvent: ((_ event: ComponentEvent) -> Void)?, content: @escaping (_ phase: ComponentPhase) -> UIView) -> UIView {
return EmbeddingUIView(
experimentId: id,
user: self.user,
Expand All @@ -268,7 +268,7 @@ public class NativebrikExperiment {
)
}

public func remoteConfig(id: String, phase: @escaping ((_ phase: RemoteConfigPhase) -> Void)) -> RemoteConfig {
public func remoteConfig(_ id: String, phase: @escaping ((_ phase: RemoteConfigPhase) -> Void)) -> RemoteConfig {
return RemoteConfig(
user: self.user,
experimentId: id,
Expand All @@ -280,7 +280,7 @@ public class NativebrikExperiment {
}

public func remoteConfigAsView<V: View>(
id: String,
_ id: String,
@ViewBuilder phase: @escaping ((_ phase: RemoteConfigPhase) -> V)
) -> some View {
return RemoteConfigAsView(
Expand Down

0 comments on commit 23326a9

Please sign in to comment.